//
//  LoginController.h
//  MClient
//
//  Created by Wang Fei on 10-5-11.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

#define kLoginFormBackgroundWidth          280
#define kLoginFormBackgroundHeight_Demo    270
#define kLoginFormBackgroundHeight_App     210

@interface MCLoginView : UIView <UITableViewDataSource, UITableViewDelegate>//标准的loginview，里面有个tableview和两个按钮和三个输入字段。huotianjun注
{
	UITableView        *_tableView;
	UIButton           *_loginButton;
	UIButton           *_settingButton;
	
	UITextField        *_partyIdField;
	UITextField        *_userIdField;
	UITextField        *_pWordField;
	id                  _delegate;
}

@property(nonatomic, retain)UITableView*  tableView;
@property(nonatomic, retain)UITextField*  partyIdField;
@property(nonatomic, retain)UITextField*  userIdField;
@property(nonatomic, retain)UITextField*  pWordField;
@property(nonatomic, assign)id            delegate; 
@property(nonatomic, readonly)UIColor*    tableCellBgColor;
@property(nonatomic, readonly)UIColor*    tableSeparatorColor;
@property(nonatomic, readonly)UIColor*    tableCellTitleColor;
@property(nonatomic, readonly)UIColor*    tableCellContentColor;

- (float) getCellAlpha;
- (id)initWithPoint:(CGPoint)point;
- (void)refreshImages;
- (void)refreshTextField:(NSArray*)aValues;
- (NSString *)getPartyLabel;
- (NSString *)getUserNameLabel;
- (NSString *)getPasswordLabel;
- (NSString *)getPartyHolder;
- (NSString *)getUserNameHolder;
- (NSString *)getPasswordHolder;
@end

@interface MCDemoLoginView : MCLoginView //扩展了标准的loginview界面，增加了一行按钮。huotianjun注
{
	UIButton           *_accountButton;
	UIButton           *_demoButton;
	UIButton           *_aboutButton;
}
@end

@interface MCAppLoginView : MCLoginView{
}
- (NSInteger)getNStepY;
@end

#import "loginStat.h"
@interface LoginController : MCViewController {//login控制器
	MCLoginView* loginView;
	int          loginViewHeight;
	BOOL         isAnimatStop;
	int          nPosy;
	
	Boolean         bAutoLogin;
	UIImageView    *imgDefault;
	NSMutableArray *fieldValues;
	BOOL            isRotate;
	BOOL            bViewWillApper;
	
	loginStat*   statJsonDao;
}

@property(nonatomic, retain)MCLoginView*  loginView;

- (void)reloadFieldValues;
- (void)addImageSubView:(UIView *) view;
- (void)hidePartyId;
- (void)hideNavigationBar;
- (NSInteger)moveLoginViewHeight;

@end
